import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;


public class Client {

	private static final QName SERVICE_NAME = new QName("http://unknown.namespace/", "HelloWorld");
	private static final QName PORT_NAME = new QName("http://unknown.namespace/", "HelloWorldPort");

	public static void main(String[] args) {
		
		System.out.println("Starting Client");
		
		//用服务名称创建一个服务
		Service service = Service.create(SERVICE_NAME);
		
		//定义EndPoint地址的内容
		service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, "http://localhost:9999/HelloWorld");
		
		HelloWorld hellworld = service.getPort(HelloWorld.class);
		System.out.println(hellworld.sayHello("涂有"));
		System.exit(0);
	}
}
